<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>商品列表</title>

    <!-- Bootstrap core CSS -->
    <link href="/shopping/thinkshop/Public/Admin/css/bootstrap.css" rel="stylesheet">
    <link href="/shopping/thinkshop/Public/Admin/js/bootstrap.js" rel="stylesheet">
    <link href="/shopping/thinkshop/Public/Admin/js/jquery-1.10.2.js" rel="stylesheet">
    <!-- Add custom CSS here -->
    <link href="/shopping/thinkshop/Public/Admin/css/sb-admin.css" rel="stylesheet">
    <link rel="stylesheet" href="/shopping/thinkshop/Public/Admin/font-awesome/css/font-awesome.min.css">


    <script src="/shopping/thinkshop/Public/Admin/js/jquery-1.10.2.js"></script>
<script src="/shopping/thinkshop/Public/Admin/js/bootstrap.js"></script>
<script src="/shopping/thinkshop/Public/Admin/js/app.js"></script>
</head>

<body>

<div id="wrapper">

    <!-- Sidebar -->
    <nav class="navbar navbar-inverse navbar-fixed-top" role="navigation">
        <!-- Brand and toggle get grouped for better mobile display -->
        <div class="navbar-header">
            <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-ex1-collapse">
                <span class="sr-only">Toggle navigation</span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
            </button>
            <a class="navbar-brand" href="<?php echo U('index/index');?>">管理后台</a>
        </div>

        <!-- Collect the nav links, forms, and other content for toggling -->
        <div class="collapse navbar-collapse navbar-ex1-collapse">

            

           
                   


<ul class="nav navbar-nav side-nav">

 <?php $menu=session('menu');?>
                

<?php if(is_array($menu)): foreach($menu as $key=>$v): ?><li class="dropdown">
        <a href="/shopping/thinkshop/admin.php/<?php echo ($v['m']); ?>/<?php echo ($v['c']); ?>/<?php echo ($v['f']); ?>"><i class="fa fa-reorder"></i> <?php echo ($v['name']); ?></a>
    </li><?php endforeach; endif; ?>
    <!-- <li class="dropdown">
        <a href="<?php echo U('goods/index');?>"><i class="fa fa-reorder"></i> 商品管理</a>
    </li>
    <li class="dropdown">
        <a href="<?php echo U('goodsclass/index');?>"><i class="fa fa-reorder"></i> 商品分类管理</a>
    </li>
    <li class="dropdown">
        <a href="<?php echo U('goodsimg/index');?>"><i class="fa fa-reorder"></i> 商品图片管理</a>
    </li> -->
    <!-- <li><a href="#"><i class="fa fa-dashboard"></i> 仪表盘</a></li>
    <li class="dropdown">
        <a href="/shopping/thinkshop/admin.php/Admin/Privilege/index"><i class="fa fa-reorder"></i> 权限管理</a>
    </li>
    <li class="dropdown">
        <a href="/shopping/thinkshop/admin.php/Admin/Role/index"><i class="fa fa-edit"></i> 角色管理</a>
    </li>
    <li class="dropdown">
        <a href=""><i class="fa fa-file-text-o"></i> 单页管理 </a>
    </li>
    <li class="dropdown">
        <a href="#"><i class="fa fa-users"></i> 用户管理</a>
    </li>
     <li class="dropdown">
        <a href="#"><i class="fa fa-link"></i> 链接管理</a>
    </li>
    <li class="dropdown">
        <a href="#" class="dropdown-toggle" data-toggle="dropdown"><i class="fa fa-cog"></i> 系统设置 <b class="caret"></b></a>
        <ul class="dropdown-menu">
            <li><a href="#">自定义字段</a></li>
            <li><a href="#">系统优化</a></li>
            <li><a href="#">缓存管理</a></li>
        </ul>
    </li> -->
</ul>

            <ul class="nav navbar-nav navbar-right navbar-user">

                <li class="dropdown user-dropdown">
                    <a href="#" class="dropdown-toggle" data-toggle="dropdown"><i class="fa fa-user"></i> 你好,<?php echo session('username');?> <b class="caret"></b></a>
                    <ul class="dropdown-menu">
                        <li><a href="#"><i class="fa fa-gear"></i> 设置</a></li>
                        <li class="divider"></li>
                        <li><a href="<?php echo U('login/logout');?>"><i class="fa fa-power-off"></i> 退出</a></li>
                    </ul>
                </li>
            </ul>
        </div><!-- /.navbar-collapse -->
    </nav>
<div id="page-wrapper">
    
    <div class="row">
        <div class="col-md-6">
            <a href="<?php echo U('goods/add');?>" class="btn btn-success">添加商品</a>
        </div>
        <div class="col-md-6">
            <form action="<?php echo U('goods/index');?>" method="post">
                <div class="form-group input-group">
                    <input type="text" class="form-control" name="key" placeholder="输入商品标题、描述或者关键词搜索">
                    <span class="input-group-btn">
                      <button class="btn btn-default" type="button"><i class="fa fa-search"></i></button>
                    </span>
                </div>
            </form>
        </div>
    </div>
    <table class="table table-hover table-striped">
        <thead>
            <tr>
                <th>编号</th>
                <th>标题</th>
                <th>商品名称</th>
                <th>商品关键词</th>
                <th>价格</th>
                <th>数量</th>
                <th>状态</th>
                <th>分类</th>
                <th>上架时间</th>
            </tr>
        </thead>
        <tbody>
        </tbody>
<!--     <div class="clearfix"></div>
    <?php echo ($page); ?>
    
</div> -->
<!-- JavaScript -->
<script src="/shopping/thinkshop/Public/Admin/js/jquery-1.10.2.js"></script>
<script src="/shopping/thinkshop/Public/Admin/js/bootstrap.js"></script>
<script src="/shopping/thinkshop/Public/Admin/js/app.js"></script>

</body>
</html>
<?php if(is_array($list)): foreach($list as $key=>$v): ?><tr>
                <td><?php echo ($v["gid"]); ?></td>
                <td><?php echo ($v["good_title"]); ?></td>
                <td><?php echo ($v["good_name"]); ?></td>
                <td><?php echo ($v["good_keyword"]); ?></td>
                <td><?php echo ($v["good_price"]); ?></td>
                <td><?php echo ($v["stock"]); ?></td>
                <td><?php echo ($v["good_state"]); ?></td>
                <td><?php echo ($v["name"]); ?></td>
                <td><?php echo ($v["shelf_time"]); ?></td>
                <td><a href="<?php echo U('Goods/add');?>?id=<?php echo ($v["gid"]); ?>">编辑</a> | <a href="<?php echo U('Goods/delete');?>?id=<?php echo ($v["gid"]); ?>" style="color:red;" onclick="javascript:return del('您真的确定要删除吗？\n\n删除后将不能恢复!');">删除</a></td>
            </tr><?php endforeach; endif; ?>

</table>
<div><?php echo ($page); ?></div>
		<!-- <td><?php echo ($v["id"]); ?></td>
                <td><?php echo ($v["title"]); ?></td>
                <td>
                </td>
                <td><?php echo (date("Y/m/d H:i:s",$v["time"])); ?></td>
                <td><?php echo ($v["username"]); ?></td>
                <td><?php echo ($v["category_title"]); ?></td>
                <td><a href="<?php echo U('post/update?id='); echo ($v["id"]); ?>">编辑</a> | <a href="<?php echo U('post/delete?id='); echo ($v["id"]); ?>" style="color:red;" onclick="javascript:return del('您真的确定要删除吗？\n\n删除后将不能恢复!');">删除</a></td> -->